package com.neusoft.rental.mapper;

import com.neusoft.rental.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {

    //sql语句请看mapper文件夹中xml文件
    //根据学号，学校，密码查找用户
    public User userQuery(User user);

    //根据用户id查找用户
    @Select("select * from user where userid=#{userid}")
    public User queryUserById(String userid);

    //用户注册时增加用户
    @Insert("insert into user values(#{userid},#{name},#{passwd},#{school},100,#{phonenumber})")
    public int userRegister(User user);

    //修改用户个人信息
    public int modifyInformation(User user);
}
